<!doctype html>
<html>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>用户协议</title>
    <link rel="stylesheet" type="text/css" href="./css/aui.css" />
    <style>
        body {
            position: absolute;
            height: 100%;
            background: rgba(0, 0, 0, 0.2);
        }

        .wrap {
            width: 100%;
            height: 100%;
            position: relative;
        }

        .wrap_inner {
            width: 295px;
            height: 423px;
            background: #fff;
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            border-radius: 6px;
            display: flex;
            flex-direction: column;
        }

        .content_top {
            width: 100%;
            font-size: 17px;
            color: #333333;
            text-align: center;
            padding-top: 25px;
            /*background: #fff;*/
            border-top-left-radius: 6px;
            border-top-right-radius: 6px;
        }

        .content_center {
            width: 100%;
            flex: 1;
            padding: 10px 20px;
            /*padding-top: 10px;
      padding-bottom: 10px;*/
            line-height: 24px;
            font-size: 17px;
            color: #222222;
            /*text-align: center;*/
            overflow: auto;
        }

        .content_bottom {
            width: 100%;
            height: 50px;
            display: flex;
            border: none;
            background-size: 100% 1px;
            background-repeat: no-repeat;
            background-position: top;
            background-image: linear-gradient(0, #EEEEEE, #EEEEEE 50%, transparent 50%);
            background-image: -webkit-linear-gradient(90deg, #EEEEEE, #EEEEEE 50%, transparent 50%);
        }

        .content_bottom span {
            width: 100%;
            flex: 1;
            height: 100%;
            line-height: 50px;
            text-align: center;
            font-size: 16px;
            color: #999999;
        }

        .content_bottom span:last-child {
            color: #FF9014;
            border: none;
            background-size: 1px 100%;
            background-repeat: no-repeat;
            background-position: left;
            background-image: linear-gradient(0, #EEEEEE, #EEEEEE 100%, transparent 100%);
            background-image: -webkit-linear-gradient(90deg, #EEEEEE, #EEEEEE 100%, transparent 100%);
        }

        [v-cloak] {
            display: none!important;
        }
    </style>
</head>

<body>
    <div id="app" class="wrap" v-cloak>
        <div class="wrap_inner">
            <div class="content_top">温馨提示</div>
            <div class="content_center">
                <p>亲爱的用户，感谢您对{{appinfo.appName}}的信任!</p>
                <p style="margin-top:10px;">我们依据最新的监管政策要求，我们更新了<span style="color: #FF9014;" @click='OpenUserAgreePage()'>《用户协议》</span>和<span style="color: #FF9014;" @click='OpenPrivacyAgreePage()'>《隐私权政策》</span>，请您在点击「同意」之前仔细阅读并充分理解。</p>
                <p>为了提供更好的服务，我们在特此说明:</p>
                <p style="margin-top:5px;">1.在您授权通过的情况下，我们将获取您的设备、位置等信息。您有权拒绝或取消授权;</p>
                <p style="margin-top:5px;">2.系统的安全保障措施，会严密保护您的个人信息;</p>
                <p style="margin-top:5px;">3.未经您本人授权同意，我们不会从任何第三方处获取您的信息，也不会与其分享您的信息。</p>
            </div>
            <div class="content_bottom">
                <span @click='closeWaiver()'>不同意</span>
                <span @click='agreeWaiver()'>同意</span>
            </div>
        </div>
    </div>
</body>

</html>
<script type="text/javascript" src="./script/api.js"></script>
<script type="text/javascript" src="./script/vue.js"></script>
<script type="text/javascript" src="./script/cling.js"></script>
<script type="text/javascript">
    apiready = function() {
        cl.apiready();
        vm.appinfo = $api.getStorage('appinfo');
    }
    var vm = new Vue({
        el: '#app',
        data: {
           appinfo:''
        },
        methods: {
          OpenUserAgreePage: function() {
              cl.openWin({
                  name: './html/login/protocol'
              })
          },
          OpenPrivacyAgreePage: function() {
              cl.openWin({
                  name: './html/login/privacy'
              })
          },
            closeWaiver: function() {
                // cl.closeFrame({
                //     name: "user_agreement_frame"
                // });
                api.closeWidget({
                    id: 'A6043996817988',
                    silent:true,
                    animation: {
                        type: 'flip',
                        subType: 'from_bottom',
                        duration: 500
                    }
                });
            },
            agreeWaiver: function() {
                api.setPrefs({
                    key: 'isAgree',
                    value: '1'
                });
                cl.closeFrame({
                    name: "user_agreement_frame"
                })
            }
        }
    });
</script>
